package com.example.administrator.energyida.util;

import android.app.Dialog;
import android.content.Context;
import android.view.Window;
import android.widget.TextView;

import com.example.administrator.energyida.R;

public class LoadingDialog {

    public static Dialog dialog;

    public static void showDialog(Context context) {
        dialog=new Dialog(context,R.style.Theme_AppCompat_Dialog);
        dialog.getWindow().requestFeature(Window.FEATURE_NO_TITLE);
        dialog.setContentView(R.layout.loading_dialog);
        dialog.setCanceledOnTouchOutside(false);
        dialog.show();
    }

    public static void disDialog() {
        dialog.dismiss();
    }

    public static void setDialogText(String strVlaue) {
        TextView textView = dialog.findViewById(R.id.dialog_textView);
        textView.setText(strVlaue);
    }

}
